POV-Ray : Newsgroups : povray.advanced-users : Enabling relative coordinate placement : Enabling relative coordinate placement Server Time
1 Jul 2024 05:12:47 EDT (-0400)
  Enabling relative coordinate placement  
From: Kene
Date: 20 Sep 2009 12:40:00
Message: <web.4ab65a2cf8370660772dd76f0@news.povray.org>
Hi:

I am building a set of macros and hopefully functions that can assist an
architect in making a building using POVRay. I understand that I cannot export
2D technical sections of the resulting design but my hopes are that if I can cut
3D sections of the building, then I can wait until POVRay can support the
process more.

My hitch right now is that I cannot enable relative coordinate placement.

It is important to be able to create an object relative to the position of
another in architecture. For example a wall can be created with coordinates
<0,0,0> <150,8000,3000> (thickness = 0.15 m, length = 8 m, height = 3 m) then
rotated to 35 degrees and translated to <5000,1000,0>. It must be possible to
create a second wall at a relative position and angle to this one without having
to do the necessary calculation from the origin. For a professional activity the
work of redoing calculations each time a design is updated or reconfigured is
very frustrating, error-prone and time-consuming.

A macro can be created to automatically create the wall with the required
thickness, length, height, rotation and final position.

for example:
#declare BedRm_North_Wall = Make_Wall( Length, Height, Thickness, Rotate_Angle,
Translate_Distance )

These are my questions:

1. Ability to create new object by referencing the location of another. The
placement of the new object is a distance or angle relative to the existing
object. For example to create a new wall by referencing the position of
BedRm_North_Wall
   - #declare BedRm_South_Wall = Make_Wall_Offset( BedRm_North_Wall, New_Length,
New_Height, New_Thickness, Offset_Distance )

2. Functions in a macro or that can get information from a macro
   I would like to be able to perform actions on a declared object. For example
instead of rotating and/or translating when they are created, these actions can
be performed afterward for example
   - #declare BedRm_North_Wall = Make_Wall( Length, Height, Thickness )
   - BedRm_North_Wall_Rotate( angle )
   - BedRm_North_Wall_Offset( offset_distance )

An option would be to write a new (text-based) tool to interface with POVRay
which may be necessary. But if I can do the above I will rather get work done
with the wonderful existing POVRay SDL.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.